 <%@ page language="java" contentType="text/html; charset=UTF-8"       
    pageEncoding="UTF-8"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>   
<%@ page import="com.paic.custserv.utils.AuthenticationUtils" %>
<%
	String path = request.getContextPath();	
	String basePath = request.getScheme() + "://"
		+ request.getServerName() + ":" + request.getServerPort()
		+ path + "/";
	String userRole = AuthenticationUtils.getUserRole();
%>      
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>待处理工单</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<link rel="stylesheet" type="text/css" href="<%=basePath %>css/reset.css"/>
	<link rel="stylesheet" type="text/css" href="<%=basePath %>css/display.css"/>
	<link type="text/css" rel="stylesheet" href="<%=basePath %>css/zTreeStyle/zTreeStyle.css" />		
	<link type="text/css" rel="stylesheet" href="<%=basePath %>js/plugin/Simpletooltip/css/simpletooltip.min.css" />
	<!--[if lt IE 9]><script src="<%=basePath %>js/html5.js"></script><![endif]-->
</head>
	<body>
		<div class="listSearch">
			<div class="listSearch-title"><h4>搜索</h4></div>
			<div class="listSearch-form">
				<div class="listSearch-line">
					<table>
						<tr>
							<td width="25%">
								<label class="inputWrap">
									工 单 号：<input type="text" id="serialNumber" name="serialNumber" class="input w120">
								</label>
							</td>
							<td width="25%">
								<label class="inputWrap">
								    工单类型：<input id="typeId" type="text" readonly value="" onclick="showMenu();" class="inputS w135"/>
								</label>
							</td>
							<td width="40%">
								<span class="inputWrap">
									工单创建时间： <input type="text" id="createTimeFrom" name="createTimeFrom" class="input w120 date-icon" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'createTimeTo\')}',readOnly:true})"> 
											    到	<input type="text" id="createTimeTo" name="createTimeTo" class="input w120 date-icon" onclick="WdatePicker({minDate:'#F{$dp.$D(\'createTimeFrom\')}',readOnly:true})">
								</span>
							</td>
						</tr>
						<tr class="h50">
							<td>
								<label class="inputWrap">
									订 单 号：<input type="text" id="orderNum" name="orderNum" class="input w120">
								</label>
							</td>
							<td>
								<label class="inputWrap">
									客户账号：<input type="text" id="customerName" name="customerName" class="input w120">
								</label>
							</td>
							<td>
								<span class="inputWrap">
									提交审核时间： <input type="text" id="flowTimeFrom" name="flowTimeFrom" class="input w120 date-icon" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'flowTimeTo\')}',readOnly:true})"> 
											    到	<input type="text" id="flowTimeTo" name="flowTimeTo" class="input w120 date-icon" onclick="WdatePicker({minDate:'#F{$dp.$D(\'flowTimeFrom\')}',readOnly:true})">
								</span>
							</td>
						</tr>
						<tr>
							<td>
								<label class="inputWrap">
									紧急程度：<select class="select w135" id="urgentPriority">
										       <option value=""  selected="selected">全部</option>
										       <option value="10">低</option>
										       <option value="30">一般</option>
										       <option value="50">紧急</option>
										       <option value="70">非常紧急</option>
										  </select>
								</label>
							</td>
							<td colspan="2">
								<button onclick="cussWorkOrderPageOp(1)"  class="btn-list"><div  class="btnInner-list gradient">查询</div></button>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		<%-- 
		<div class="listOption">
			<ul class="gradient clearfix">
				<li onclick="redirectAddPage()" class="listOption-add">添加</li>
				<!-- <li>|</li>
				<li class="listOption-edit">编辑</li> -->
			</ul>
		</div>
		--%>
		<div class="listWrap" id="tableList"></div>
	<div id="menuContent" class="menuContent" style="display:none; position: absolute;">
		 <ul id="treeDemo" class="ztree" style="border: 1px solid #ccc;border-radius: 5px;margin-top:0; width:160px;background:#fff;padding-bottom:20px;padding-right:20px;"><li>暂无工单类型</li></ul>
	</div>	
	</body>
	
	<!--插件引用-->
	<script id="table-template" type="text/x-handlebars-template">	
        <table cellpadding="0" cellspacing="0" border="0" class="listWrap-table">
				<thead>
					<tr>
						<th>工单编号</th>
						<th>工单类型</th>
						<th>工单细分</th>
						<th>工单状态</th>
						<th>紧急程度</th>
						<th>客户帐号</th>
						<th>创建时间</th>
						<th>工单描述</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{{#if results}}
		                {{#each results}}
			             <tr>			                
			                <td class="p5">{{serialNumber}}</td>
			                <td>{{#if parentTypeName}}{{parentTypeName}}{{else}}{{typeName}}{{/if}}</td>
			                <td>{{#if parentTypeName}}{{typeName}}{{/if}}</td>
			                <td>{{statusName}}</td>
							<td>{{urgentName}}</td>
			                <td>{{customerName}}</td>
			                <td>{{showDateFormat createTime}}</td>
			                <td class="ellipsis tipss  p5"  data-simpletooltip-position="left-bottom" data-simpletooltip-theme="gray"  title='{{{issuDesc}}}'>{{issuDescWord}}</td>
			                <td><a href="#" onclick="toShowPage({{idWorkOrder}})" >查看</a></td>
			             </tr>  
		               {{/each}} 
	               {{else}}
	                  <tr><td colspan="9"> 暂无数据！</td></tr>
	               {{/if}}				
				</tbody>
		</table>
		{{#if results}}
			<div class="page">
			<p style="float:left;">
				共计{{totalRecord}}条/{{totalPage}}页数据,每页{{pageSize}}条
			</p>	
			<p style="float:right;">
				{{#compare currentPage 1}}<span class="pageText" onclick="cussWorkOrderPageOp(1)">首页</span><span class="pageText" onclick="cussWorkOrderPageOp({{currentPage}}-1)">上一页</span>
				{{else}}<span class="pageText pageDisable">首页</span><span class="pageText pageDisable">上一页</span>{{/compare}}
				{{#list listbegin listend currentPage}}
				{{/list}}
				{{#compare2 currentPage totalPage}}
					<span class="pageText" onclick="cussWorkOrderPageOp({{currentPage}}+1)">下一页</span>
					<span class="pageText" onclick="cussWorkOrderPageOp({{totalPage}})">末页</span>
				{{else}}
					<span class="pageText pageDisable">下一页</span>
					<span class="pageText pageDisable">末页</span>
				{{/compare2}}        
			</p>
			</div>                      
		{{/if}}				
</script>

<script type="text/javascript">
	var basePath = '<%=basePath %>';
	var userRole = "<%=userRole %>";
	var optype = "${optype }";
</script>
<script src="<%=basePath %>js/jquery.min.js"></script>
<script src="<%=basePath %>js/jquery.ztree.core-3.5.js"></script>
<script src="<%=basePath %>js/jquery.ztree.excheck-3.5.min.js"></script>				
<script src="<%=basePath %>js/main.js"></script>
<script src="<%=basePath %>js/handlebars-1.0.0.beta.6.js"></script>	
<script src="<%=basePath %>js/dateFormat.js"></script>	
<script src="<%=basePath %>js/plugin/My97DatePicker/WdatePicker.js"></script>
<script src="<%=basePath %>js/work_order_main.js"></script>
<script src="<%=basePath %>js/plugin/Simpletooltip/js/modernizr.simpletooltip.min.js"></script>
<script src="<%=basePath %>js/plugin/Simpletooltip/js/simpletooltip.min.js"></script>		
</html>